package com.htu.hdfs;
import java.io.IOException;  
import java.net.URI;  
import java.net.URISyntaxException;  
import org.apache.hadoop.conf.Configuration;  
import org.apache.hadoop.fs.FSDataOutputStream;  
import org.apache.hadoop.fs.FileSystem;  
import org.apache.hadoop.fs.Path;  
public class TouchFile {
	public static void main(String[] args) throws IOException,URISyntaxException{  
		Configuration configuration = new Configuration();   
		String hdfsPath = "hdfs://localhost:9000";  
		FileSystem hdfs = FileSystem.get(new URI(hdfsPath), configuration);  
		String filePath = "/hdfstest/touchfile";  
		FSDataOutputStream create = hdfs.create(new Path(filePath));  
		System.out.println("Finish!");  
		}  
}
